package com.lbn.jfqsc.app.account.recruitment;

import com.lbn.baseframe.mvp.BasePresenter;
import com.lbn.baseframe.net.business.RxSubscribe;
import com.lbn.jfqsc.App;
import com.lbn.jfqsc.net.Host;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 李炳南
 * @date 2017/3/1
 */
public class RecruitmentPresenter extends BasePresenter<IRecruitmentView> {


    public void jobInfo(String title,String introduce,String content,String place,int type){

        Map<String,String>map = new HashMap<>();
        map.put("userId", App.getUser().getId()+"");
        map.put("title", title);
        map.put("type", type+"");
        map.put("introduce", introduce);
        map.put("content", content);
        map.put("place", place);


        subscribeNetwork(Host.getApi().jobInfo(map), new RxSubscribe() {
            @Override
            public void next(Object o) {
                getView().onSucceed();
            }

            @Override
            public void error(Throwable e) {
                getView().onError(e.getMessage());
            }
        });


    }

}
